<?php
namespace App\Http\Resources;
use Illuminate\Http\Request;


trait BaseResource
{
    public function hasInclude(Request $request, $option)
    {
        if (in_array($option, (array) $request->get('include', null))){
            return true;
        }else{
            return false;
        }
    }
    public function StringArrayToInt($a){
        $array= [];
        foreach($a as $v)
        {
            $array[]=(int)$v;
        }
        return $array;
    }
}
